package com.xinshujia.wxxcx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinshujia.wxxcx.pojos.entity.Machine;
import com.xinshujia.wxxcx.pojos.info.MachineInfo;
import com.xinshujia.wxxcx.pojos.vo.MachineVos;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author Cui Han
 * @Date 2024/5/17 14:20
 * @Description: TODO
 * @Version 1.0
 */
@Mapper
public interface MachineMapper  {

    @Select("select id,name ,device_guid from  machine where production_line_id = #{productionLineId}")
    List<MachineInfo> findByProductionLineIdMachine(Long productionLineId);

    @Select("select id , production_line_id from machine where device_guid = #{deviceGUID} ")
    MachineVos selectMachine(String deviceGUID);

    @Select("select id from machine where device_guid = #{deviceGUID} ")
    Machine selectMachineById(String deviceGUID);
}
